#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPen>
#include <QBrush>
#include <QMouseEvent>
#include <QPainter>
#include <QPaintEvent>
#include <QComboBox>
#include <QLabel>
#include <QString>
#include <QDebug>
#include <QColorDialog>
#include <QRegExpValidator>
#include <QCloseEvent>
#include <QDir>
#include "drawlabel.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    bool eventFilter(QObject *obj, QEvent *event);
    void closeEvent(QCloseEvent *event);
    void initCombo(QComboBox *combo, QList<QColor> color);
private:
    Ui::MainWindow *ui;
    DrawLabel *drawLabel;
    QColor penColor;
    QColor brushColor;
    QColor backColor;
    int penSize;
    int drawType=0;
    int polygonType;
    int a;

    QList<QColor> colors1, colors2;
    QList<int> pens;
    QList<QLabel *> labelList;
    QList<QLabel *> tlList1;
    QList<QLabel *> tlList2;

public slots:
    void slotChangeColor(int);
    void slotOtherColor();
    void slotChangePenSize(QString);
    void slotChangePolygonType(int);
    void slotAutoFill(int);
};
#endif // MAINWINDOW_H
